package com.person.leetcode.editor.cn;

/**
  * 1450.在既定时间做作业的学生人数
  * 2022-08-19 15:52:09
**/
public class Sequence_1450_NumberOfStudentsDoingHomeworkAtAGivenTime {
    public static void main(String[] args) {
        Solution solution = new Sequence_1450_NumberOfStudentsDoingHomeworkAtAGivenTime().new Solution();
    }
    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public int busyStudent(int[] startTime, int[] endTime, int queryTime) {
            int n = startTime.length;
            int ans = 0;
            for (int i = 0; i < n; i++) {
                if (startTime[i] <= queryTime && endTime[i] >= queryTime) {
                    ans++;
                }
            }
            return ans;
        }
    }

//leetcode submit region end(Prohibit modification and deletion)

}